package com.bite.bite_forum.services;

import com.bite.bite_forum.model.Message;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface IMessageService {
    void create(Message message);

    Integer selectUnreadCount(Long receiveUserId);

    /**
     * 根据id查询
     * @param id
     * @return
     */
    Message selectById(Long id);


    /**
     * 获取私信列表
     * @param receiveUserId
     * @return
     */
    List<Message> selectByReceiveUserId(Long receiveUserId);

    void updateStateById(Long id, Byte state);

    /**
     * 回复信
     * @param repliedId
     * @param
     */
    @Transactional
    void reply(Long repliedId, Message message);

}
